package com.neiquan.weiguan.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.neiquan.weiguan.R;

import java.util.List;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by wyl on 2016/7/2.
 * 消息通知适配器
 */
public class MessageNotAdapter extends MyBaseAdapter<String> {
    private Context context;
    private List<String> data;

    public MessageNotAdapter(Context context, List<String> data) {
        super(context, data);
        this.context = context;
        this.data = data;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.fragment_messagenot_item, null);
        return new MessageNotViewHolder(view);
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 5;
    }

    public class MessageNotViewHolder extends RecyclerView.ViewHolder {
        @InjectView(R.id.img_messagenot_item_user)
        ImageView mImgMessagenotItemUser;
        @InjectView(R.id.text_messagenot_item_username)
        TextView mTextMessagenotItemUsername;
        @InjectView(R.id.text_messagenot_item_content)
        TextView mTextMessagenotItemContent;
        @InjectView(R.id.img_messagenot_item_heart)
        ImageView mImgMessagenotItemHeart;
        @InjectView(R.id.text_messagenot_item_time)
        TextView mTextMessagenotItemTime;
        @InjectView(R.id.text_messagenot_item_contents)
        TextView mTextMessagenotItemContents;

        public MessageNotViewHolder(View itemView) {
            super(itemView);
            ButterKnife.inject(this, itemView);
        }
    }
}
